<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>rotating-card</title>
    <style>
        .card {
            perspective: 150rem;
            position: relative;
            height: 40rem;
            max-width: 400px;
            margin: 2rem;
            box-shadow: none;
            background: none;
        }
        .card-side {
            height: 35rem;
            border-radius: 15px;
            transition: all .8s cubic-bezier(0.075, 0.82, 0.165, 1);
            backface-visibility: hidden;
            position: absolute;
            top: 0;
            left: 0;
            width: 80%;
            padding: 2rem;
            color:#fff;
        }
        .card-side.back {
            transform: rotateY(-180deg);
            background-color: #4158bd;
            background-image: linear-gradient(43deg, #4158D0 0%,#C850C0 46%, #FFCC70 100%);
        }
        .card-side.front {
            background-color: #0093E9;
            background-image: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%);
        }
        .card:hover .card-side.front {
            transform: rotateY(180deg);
        }
        .card:hover .card-side.back {
            transform: rotateY(0deg);
        }
    </style>
</head>
<body>
    <div class="card">
        <div class="card-side front">
            <div class="card-item">Front Side</div>
        </div>
        <div class="card-side back">
            <div class="card-item">Back Side</div>
        </div>
    </div>
</body>
</html>